#include "device/Serial.h"

bool Serial::read(word_t start_addr, size_t length, uint8_t* buffer) {
    return false;
}

bool Serial::write(word_t start_addr, size_t length, const uint8_t* buffer) {
    word_t offset = start_addr - SERIAL_BASE;
    assert(length == 1);
    if (offset == 0) {
        putc(buffer[0], stderr);
    } else {
        assert(0);
    }
    return true;
}

void Serial::update() {
    return;
}
